package com.yykj.base.server.scheduled;

import com.yykj.base.server.service.impl.WordServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class BaseTask {

    @Scheduled(cron = "*/5 * * * * *")
    private void grantLoan()   {
        log.info("【定时任务】开始找没有WuBi的字");
        wordService.intiWuBi();
        log.info("【定时任务】完成");
    }

    private WordServiceImpl wordService;

    @Autowired
    public void setWordService(WordServiceImpl wordService) {
        this.wordService = wordService;
    }
}
